#ifndef _BSP_USART_FIFO_H_
#define _BSP_USART_FIFO_H_

#include "Mini58Series.h"
#include "stdint.h"

#define UART_NUM 2

#define UART0_NUM 0
#define UART1_NUM 1

#define UART0_EN 1
#define UART1_EN 1

#define UART_RX_BUF_LEN 64

#if UART0_EN == 1
#define UART0_BAUD 115200
#endif

#if UART1_EN == 1
#define UART1_BAUD 19200
#endif

typedef struct {
  UART_T *uart;
  uint8_t rxBuf[UART_RX_BUF_LEN];
  uint16_t pRxWrite;
  uint16_t pRxRead;
} UART_ST;

void bsp_InitUart(void);
UART_ST *bsp_uart_get_parm(uint8_t uart_num);
void bsp_uart_send_byte(uint8_t uart_num, uint8_t byte);

#endif
